 
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>Fly Template v3.0，基于 layui 的极简社区页面模版</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="keywords" content="fly,layui,前端社区">
  <meta name="description" content="Fly社区是模块化前端UI框架Layui的官网社区，致力于为web开发提供强劲动力">
  <link rel="stylesheet" href="../../res/layui/css/layui.css">
  <link rel="stylesheet" href="../../res/css/global.css">
</head>
<body>

<div th:replace="fragments::header"></div>

<div th:replace="fragments::menu"></div>

<div class="layui-container">
  <div class="layui-row layui-col-space15">
    <div class="layui-col-md8 content detail">
      <div class="fly-panel detail-box">
        <h1 th:text="${question.title}">Fly Template v3.0，基于 layui 的极简社区页面模版</h1>
        <div class="fly-detail-info">
          <!-- <span class="layui-badge">审核中</span> -->
          <span class="layui-badge layui-bg-green fly-detail-column" th:if="${question.type==1}">提问</span>
          <span class="layui-badge layui-bg-green fly-detail-column" th:if="${question.type==2}">分享</span>
          <span class="layui-badge layui-bg-green fly-detail-column" th:if="${question.type==3}">讨论</span>
          <span class="layui-badge layui-bg-green fly-detail-column" th:if="${question.type==4}">建议</span>
          <span class="layui-badge layui-bg-green fly-detail-column" th:if="${question.type==5}">公告</span>
          <span class="layui-badge layui-bg-green fly-detail-column" th:if="${question.type==6}">动态</span>
          
          <span class="layui-badge" style="background-color: #999;" th:if="${question.status==0}">未结</span>
          <span class="layui-badge" style="background-color: #5FB878;"  th:if="${question.status==1}">已结</span>
          
          <span class="layui-badge layui-bg-black" th:if="${question.level==1}">置顶</span>
          <span class="layui-badge layui-bg-red" th:if="${question.level==2}">精帖</span>
          
          <div class="fly-admin-box" th:data-id="${question.id}" th:if="${session.user != null}">
            <span class="layui-btn layui-btn-xs jie-admin" type="del" 
            	th:if="${session.user.id==user.id or session.user.role==1}">删除</span>
            
            <span class="layui-btn layui-btn-xs jie-admin" type="set" field="level" rank="1"
            	th:if="${session.user.role==1 and question.level==0}">置顶</span> 
            <span class="layui-btn layui-btn-xs jie-admin" type="set" field="level" rank="0" style="background-color:#ccc;"
            	th:if="${session.user.role==1 and question.level==1}">取消置顶</span>
            
            <span class="layui-btn layui-btn-xs jie-admin" type="set" field="level" rank="2"
            	th:if="${session.user.role==1 and question.level==0}">加精</span> 
            <span class="layui-btn layui-btn-xs jie-admin" type="set" field="level" rank="0" style="background-color:#ccc;"
            	th:if="${session.user.role==1 and question.level==2}">取消加精</span>
          	
          </div>
          <span class="fly-list-nums"> 
            <a href="#comment"><i class="iconfont" title="回答">&#xe60c;</i> <span th:text="${question.replynum}" id="jiedaCount">66</span></a>
            <i class="iconfont" title="人气">&#xe60b;</i> <span th:text="${question.viewsnum}">99999</span>
          </span>
        </div>
        <div class="detail-about">
          <a class="fly-avatar" href="../user/home.html">
            <img th:if="${user.head == null}"
            	src="https://tva1.sinaimg.cn/crop.0.0.118.118.180/5db11ff4gw1e77d3nqrv8j203b03cweg.jpg"
             	th:alt="${user.nickname}">
             <img th:if="${user.head != null}"
             	th:src="@{/upload/}+${user.head}"
             	th:alt="${user.nickname}">
          </a>
          <div class="fly-detail-user">
            <a href="../user/home.html" class="fly-link">
              <cite th:text="${user.nickname}">贤心</cite>
              
                  <i class="iconfont icon-renzheng" th:if="${user.cert!=null}" th:title="'认证信息：'+${user.cert}"></i>
              <i class="layui-badge fly-badge-vip" th:text="'VIP'+${#strings.length(user.vip)}">VIP3</i>
            </a>
            <span th:text="${#dates.format(question.createtime, 'yyyy-MM-dd HH:mm:ss')}">2017-11-30</span>
          </div>
          <div class="detail-hits" id="LAY_jieAdmin" data-id="123">
            <span style="padding-right: 10px; color: #FF7200">悬赏：<span th:text="${question.kiss}">60</span>飞吻</span>  
            <span class="layui-btn layui-btn-xs jie-admin" type="edit"
            	th:if="${session.user != null and session.user.id == user.id}"><a th:href="@{/question/edit(id=${question.id})}">编辑此贴</a></span>
          </div>
        </div>
        <div class="detail-body photos" th:text="${question.content}">
          <p>
            该模版由 layui官方社区（<a href="http://fly.layui.com/" target="_blank">fly.layui.com</a>）倾情提供，只为表明我们对 layui 执着的信念、以及对持续加强的承诺。该模版基于 layui 搭建而成，可作为极简通用型社区的页面支撑。
          </p>
        </div>
      </div>

      <div class="fly-panel detail-box" id="flyReply">
        <fieldset class="layui-elem-field layui-field-title" style="text-align: center;">
          <legend>回帖</legend>
        </fieldset>

        <ul class="jieda" id="jieda">
          <li th:each="answer:${answers}"
           th:data-id="${answer.id}" class="jieda-daan">
            <div class="detail-about detail-about-reply">
              <a class="fly-avatar" th:href="@{/user/home(id=${answer.uid})}">
                <img th:if="${answer.get('head')==null}" src="https://tva1.sinaimg.cn/crop.0.0.118.118.180/5db11ff4gw1e77d3nqrv8j203b03cweg.jpg" alt=" ">
              	<img th:if="${answer.get('head')!=null}" th:src="@{/upload/}+${answer.head}">
              </a>
              <div class="fly-detail-user">
                <a href="" class="fly-link">
                  <cite th:text="${answer.nickname}">贤心</cite>
                  
                  <i class="iconfont icon-renzheng" th:if="${answer.get('cert')!=null}" th:title="'认证信息：'+${answer.cert}"></i>
                  <i class="layui-badge fly-badge-vip" 
                  	th:if="${answer.vip>0}"
                  	th:text="'VIP'+${#strings.length(answer.vip)}">VIP3</i>              
                </a>
                
                <span th:if="${answer.uid==question.uid}">(楼主)</span>
                
                <span style="color:#5FB878" th:if="${answer.role==1}">(管理员)</span>
                <!--
                <span style="color:#FF9E3F">（社区之光）</span>-->
                <span style="color:#999" th:if="${answer.ustatus==1}">（该号已被封）</span>
                
              </div>

              <div class="detail-hits">
                <span th:text="${#dates.format(answer.createtime, 'yyyy-MM-dd HH:mm:ss')}">2017-11-30</span>
              </div>

              <i th:if="${answer.status==1}" class="iconfont icon-caina" title="最佳答案"></i>
            </div>
            <div class="detail-body jieda-body photos" th:text="${answer.status!=2?answer.content:'[此回复已删除]'}">
              
            </div>
            <div class="jieda-reply" th:if="${answer.status!=2}">
              <span th:class="${answer.get('like_id')==null?'jieda-zan':'jieda-zan zanok'}" type="zan">
                <i class="iconfont icon-zan"></i>
                <em th:text="${answer.like}">66</em>
              </span>
              <span type="reply">
                <i class="iconfont icon-svgmoban53"></i>
                回复
              </span>
              <div class="jieda-admin" th:if="${session.user != null}">
                <span type="edit" 
                	th:if="${session.user.id==answer.uid}">编辑</span>
                <span type="del"  
                	th:if="${session.user.id==answer.uid or session.user.role==1}">删除</span>
                <span class="jieda-accept" type="accept" 
                	th:if="${session.user.id==question.uid and question.status==0}">采纳</span>
              </div>
            </div>
          </li>
          
          
          <!-- 无数据时 -->
          <!-- <li class="fly-none">消灭零回复</li> -->
        </ul>
        
        <div class="layui-form layui-form-pane">
          <form th:action="@{/question/reply}" method="post">
            <div class="layui-form-item layui-form-text">
              <a name="comment"></a>
              <div class="layui-input-block">
                <textarea id="L_content" name="content" required lay-verify="required" placeholder="请输入内容"  class="layui-textarea fly-editor" style="height: 150px;"></textarea>
              </div>
            </div>
            <div class="layui-form-item">
              <input type="hidden" name="qid" th:value="${question.id}">
              <button class="layui-btn" lay-filter="*" lay-submit>提交回复</button>
            </div>
          </form>
        </div>
      </div>
    </div>
    <div class="layui-col-md4">
      <dl class="fly-panel fly-list-one "  id="LAY_QuesWeekReply">
        <dt class="fly-panel-title">本周热议</dt>
        <div>
	        <dd>
	          <a href="jie/detail.html">基于 layui 的极简社区页面模版</a>
	          <span><i class="iconfont icon-pinglun1"></i> 16</span>
	        </dd>
	        <dd>
	          <a href="jie/detail.html">基于 layui 的极简社区页面模版</a>
	          <span><i class="iconfont icon-pinglun1"></i> 16</span>
	        </dd>
	        
        </div>

        <!-- 无数据时 -->
        <!--
        <div class="fly-none">没有相关数据</div>
        -->
      </dl>

      <div class="fly-panel">
        <div class="fly-panel-title">
          这里可作为广告区域
        </div>
        <div class="fly-panel-main">
          <a href="http://layim.layui.com/?from=fly" target="_blank" class="fly-zanzhu" time-limit="2017.09.25-2099.01.01" style="background-color: #5FB878;">LayIM 3.0 - layui 旗舰之作</a>
        </div>
      </div>

      <div class="fly-panel" style="padding: 20px 0; text-align: center;">
        <img src="../../res/images/weixin.jpg" style="max-width: 100%;" alt="layui">
        <p style="position: relative; color: #666;">微信扫码关注 layui 公众号</p>
      </div>

    </div>
  </div>
</div>

<div class="fly-footer">
  <p><a href="http://fly.layui.com/" target="_blank">Fly社区</a> 2017 &copy; <a href="http://www.layui.com/" target="_blank">layui.com 出品</a></p>
  <p>
    <a href="http://fly.layui.com/jie/3147/" target="_blank">付费计划</a>
    <a href="http://www.layui.com/template/fly/" target="_blank">获取Fly社区模版</a>
    <a href="http://fly.layui.com/jie/2461/" target="_blank">微信公众号</a>
  </p>
</div>

<script src="../../res/layui/layui.js"></script>
<script>
layui.cache.page = 'jie';
layui.cache.user = {
  username: '游客'
  ,uid: -1
  ,avatar: '../../res/images/avatar/00.jpg'
  ,experience: 83
  ,sex: '男'
};
layui.config({
  version: "3.0.0"
  ,base: '../../res/mods/'
}).extend({
  fly: 'index'
}).use(['fly', 'face'], function(){
  var $ = layui.$
  ,fly = layui.fly;
  //如果你是采用模版自带的编辑器，你需要开启以下语句来解析。
  /**/
  $('.detail-body').each(function(){
    var othis = $(this), html = othis.html();
    othis.html(fly.content(html));
  });
  
});
</script>

</body>
</html>